
package com.goseet.ffmpeg;

public class c {
    protected boolean a;

    private long b;

    public c() {
        this(ffmpegJNI.new_IMedia());
    }

    protected c(long l) {
        a = true;
        b = l;
    }

    public static void c() {
        ffmpegJNI.IMedia_init();
    }

    public void a() {
        synchronized (this) {
            if (b != 0L) {
                if (a) {
                    a = false;
                    ffmpegJNI.delete_IMedia(b);
                }
                b = 0L;
            }
        }
    }

    protected void finalize() {
        a();
    }
}
